<% rowbg = 0 %>
<div class="tip"><%= reqd_sym %> Indicates a required field</div>
<table class="form">
  <%= render("questions/title_and_hint", :lang => Language.english, :f => f) %>
  <tr class="rowbg<%= rowbg = 1 - rowbg %>">
    <td class="name">Code <%= reqd_sym %></td>
    <td class="value"><%= f.text_field(:code, :maxlength => 20) %></td>
    <td class="details">
      A short codename (between 2-20 characters). Should contain only letters and numbers, e.g. BallotBoxSealed, DepartTime.
    </td>
  </tr>
  <tr id="type_row" class="rowbg<%= rowbg = 1 - rowbg %>">
    <td class="name">Type <%= reqd_sym %></td>
    <td class="value">
      <%= f.select(:question_type_id, QuestionType.select_options, {:include_blank => true}, 
        :onchange => "show_hide_option_set(this.options[this.selectedIndex].text)") %>
    </td>
    <td class="details">
      The kind of information the user will be entering.
    </td>
  </tr>
  <tr class="rowbg<%= rowbg = 1 - rowbg %>">
    <td class="name">Option Set <%= reqd_sym %></td>
    <td class="value">
      <%= f.select(:option_set_id, OptionSet.select_options, {:include_blank => true}, 
        {:id => "option_set", :style => question.is_select? ? '' : 'display: none'}) %>
      <div id="option_set_not_applicable" <%= question.is_select? || f.mode == :show ? 'style="display: none"'.html_safe : ''%>>
        Not applicable
      </div>
    </td>
    <td class="details">
      The set of options the user will be able to choose from.
    </td>
  </tr>
  <tr id="min">
    <td>Minimum</td>
    <td>
      <%= f.text_field(:minimum)  %> 
      &nbsp; &nbsp; &nbsp; <%= f.check_box(:minstrictly) %> Strictly greater than
    </td>
    <td>
      The minimum value for the response. Check the box if the minimum itself is not acceptable.
    </td>
  </tr>
  <tr id="max">
    <td>Maximum</td>
    <td>
      <%= f.text_field(:maximum)  %>
      &nbsp; &nbsp; &nbsp; <%= f.check_box(:maxstrictly) %> Strictly less than
    </td>
    <td>
      The maximum value for the response. Check the box if the maximum itself is not acceptable.
    </td>
  </tr>
  <% (Language.active - [Language.english]).each do |lang| %>
    <%= render("questions/title_and_hint", :lang => lang, :f => f) %>
  <% end %>
</table>      
